POV-Ray : Newsgroups : povray.newusers : Casting sinusoidal shadow on an object ? : Casting sinusoidal shadow on an object ? Server Time
30 Jul 2024 18:15:44 EDT (-0400)
  Casting sinusoidal shadow on an object ?  
From: Omega
Date: 12 Nov 2003 15:40:01
Message: <web.3fb29a7b2d6843d5d947fdc0@news.povray.org>
I'd like to create a sinusoidal shadow on an object.

Does anyone have an idea on how to do that?

Here what I've tried: I created several boxes objects between the source
light and the object to be shadowed. I then set the light to be a an
area_light type. But...it creates a triangular shadow (when doing a line
profile in X).

Something I would have liked to try, is defocusing the shadow produced by my
boxes objects using some kind of lens...but I don't know how to do that.

Any help?

Regards,
O.

Source Code:
////////////////////////////////////////////////////////////////
/// Synthesize a BGA 19x19 image


global_settings { assumed_gamma 2.2 }

#include "colors.inc"
#include "textures.inc"
#include "stones.inc"


camera {
  orthographic
  location <0, 0, -500>
  right <640, 0, 0>
  up <0, 480, 0>
  look_at <0, 0, 0>
}


background { color MidnightBlue }

plane { z, 0
   pigment {
      colour Gray40
   }
   finish {
      ambient 0.2
      diffuse 0.8
   }
}


#declare Unit_To_Mm = 1;    // 1 unit is X mm

#declare Ronchi_Line_Width = 5;
#declare Ronchi_WidthX = 1200;
#declare Ronchi_HeightY = 1200;

#declare Fringe = box {
    <0, Ronchi_HeightY,  0>,  // Near lower left corner
    <Ronchi_Line_Width, -Ronchi_HeightY, 0>   // Far upper right corner
    pigment { color Black }
  }


#declare Ronchi = union {
 object { Fringe translate <0,0,0> }
 //object { Fringe translate <2*Ronchi_Line_Width,0,0> }

 #declare F = 2*Ronchi_Line_Width;
 #while (F < Ronchi_WidthX/2)
  object { Fringe translate x*F }
  object { Fringe translate -x*F }
  #declare F = F + 2*Ronchi_Line_Width;
 #end
}


object { Ronchi translate <0, 0, -1900> }

light_source { <0, 0, -2000> colour Gray70
    area_light <5, 0, 0>, <0, 1, 0>, 10, 1
    adaptive 1
    jitter
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.